package chainOfResponsibility.support;

import chainOfResponsibility.Support;
import chainOfResponsibility.Trouble;

public class LimitSupport extends Support {
   private int limit;

    public LimitSupport(String name, int limit) {
        super(name);
        this.limit = limit;
    }

    @Override
    protected boolean resolve(Trouble trouble) {
//        return false;
        if(trouble.getNumber()<limit){
            return true;
        }else{
            return false;
        }
    }
}
